package bigbrother.log.logentries;

import bigbrother.ParameterChecker;
import org.joda.time.DateTime;

/**
 * A {@link LogEntry} for normal channel messages.
 *
 * @author Hans Haggstrom
 */
public final class MessageEntry
        extends AbstractLogEntry
{

    //======================================================================
    // Private Fields

    private final String myMessage;

    //======================================================================
    // Public Methods

    //----------------------------------------------------------------------
    // Constructors

    public MessageEntry( final DateTime timeStamp,
                         final String nick,
                         final String channel,
                         final String message )
    {
        super( timeStamp, nick, channel );

        ParameterChecker.checkNotNull( message, "message" );

        myMessage = message;
    }

    //----------------------------------------------------------------------
    // LogEntry Implementation


    public String getAsString()
    {
        return myMessage;
    }

}
